#include "RTC_HAL_QE.h"

uint8 u8RTC_CheckFlag (void)
{
    return RTCSC_RTIF;
}

void vfnRTC_ClearFlag (void)
{
    RTCSC_RTIF = 1;
}

void vfnRTC_ClockSelect (uint8 u8clock)
{
    RTCSC_RTCLKS = u8clock;
}

void vfnRTC_InterruptConfig (uint8 u8status)
{
    RTCSC_RTIE = u8status;
}

void vfnRTC_PrescalerSelect (uint8 u8prescaler)
{
    RTCSC_RTCPS = u8prescaler;
}

void vfnRTC_SetModulo (uint8 u8modulo)
{
    RTCMOD = u8modulo;
}

uint8 u8RTC_ReadCounter (void)
{
    return RTCCNT;    
}